import { _decorator } from 'cc'
import { Role } from '../../Base/Role'
import { TRAP_STATE, TrapStateMachine } from './TrapStateMachine'
const { ccclass, property } = _decorator

@ccclass('TrapController')
export class TrapController extends Role {
  x = 2
  y = 4
  private _fsm: TrapStateMachine = null
  init() {
    //创建门精灵组件
    this.createRoleSprite()
    this._fsm = new TrapStateMachine(this._animationComponent)
    this._fsm.stateName = TRAP_STATE.ATTACK
  }
}
